<html>
<head>
<title>test</title>
</head>

<form id="myForm" action="form_action.asp">
  <textarea type="text" id="liste" name="fname"></textarea><br>
  <p id="demo"></p>
  <input type="button" onclick="myFunction()" value="Submit">
</form>

<script>
function myFunction() {
    var ar = document.getElementById("liste").value.split("\n");;
	if(ar.length < 7){
		$.ajax({ type: "GET", url: "ok.php" });
	}else{
		$.ajax({ type: "GET", url: "ko.php" });
	}
}
</script>
</body>

</html>


<?php
/*
if(isset($_POST['submit']))
{
   sayHelloWorld();
} 

function sayHelloWorld()
{
    $wsdl = "http://localhost:8080/test/hello?WSDL";
		$client = new SoapClient($wsdl);
		
		$params = new stdClass();
		$params->from = $_POST["from"];
		$res = $client->sayHelloWorld($params);
		
		echo $res->return;
}
*/		
?>

